<?php
class LoginForm extends sfForm{
    public function configure(){
        $this->setWidgets(array(
                    'usuario'   => new sfWidgetFormInput(array(),array("size"=>"15",  "maxlength"=>"15")),
                    'clave'     => new sfWidgetFormInput(array(),array("size"=>"15",  "maxlength"=>"15"))
            ));
        $this->widgetSchema->setNameFormat("login[%s]");
        $this->setValidators(array(
                'usuario' => new sfValidatorString(array('required' => true)),
                'clave' =>  new sfValidatorString(array('required' => true))
            ));
            
        $this->validatorSchema->setPostValidator(
            new sfGuardValidatorUser(array('username_field' => 'usuario', 'password_field' => 'clave' )));
        $this->widgetSchema->setLabels(array(
                'usuario'   => "Usiario&nbsp;: ",
                'clave'     => "Clave&nbsp;&nbsp;&nbsp;:"
        ));
    }
}
?>
